var express = require('express');
var router = express.Router();
var path = require('path');
var sqlite3 = require('sqlite3').verbose();
/* GET users listing. */

router.get('/', function(req, res, next) { 
  var db=new sqlite3.Database(path.join(__dirname, "../db/ChangR.s3db"));
  db.all("SELECT * from GD_user",function(err,row) {
    if (err) throw err
    else {
        console.log(row)
        if(row.length!=0)
        var retu={"code": 0,
        "msg": "",
        "count": 1000,
        "data":row}
        res.send(retu);
    }
    });
    db.close();
});
module.exports = router;